package com.ltmonitor.web.controller;

import com.ltmonitor.entity.VehicleData;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 报表Action
 * @author admin
 *
 */
@Controller
@RequestMapping("/report")
public class ReportAction extends PaginateAction {

	/**
	 * 打开录像文件页面
	 * @return
	 */
	@RequestMapping("/viewRecordVideoFileList.action")
	public String viewRecordVideoFileList()
	{
		return "/report/videoRecordFileList";
	}

	/**
	 * 打开录像文件页面
	 * @return
	 */
	@RequestMapping("/viewFtpFileList.action")
	public String viewFtpFileList(Model model,
								  @RequestParam(value = "vehicleId", defaultValue="0") long vehicleId)
	{
		if(vehicleId > 0)
		{
			VehicleData vd = this.vehicleDataService.load(vehicleId);
			if(vd != null)
			{
				model.addAttribute("plateNo", vd.getPlateNo());
			}
		}
		return "/report/ftpFileList";
	}

	/**
	 * 打开视频播放记录页面
	 * @return
	 */
	@RequestMapping("/viewVideoRequestRecord.action")
	public String viewVideoRequestRecord()
	{
		return "/report/videoRequestRecord";
	}

	/**
	 * 打开视频播放次数统计页面
	 * @return
	 */
	@RequestMapping("/viewVideoRequestTimesRecord.action")
	public String viewVideoRequestTimesRecord()
	{
		return "/report/videoRequestTimes";
	}


	/**
	 * 打开视频流量统计页面
	 * @return
	 */
	@RequestMapping("/viewVideoDataUsageStatistic.action")
	public String viewVideoDataUsageStatistic()
	{
		return "/report/videoDataUsageStatistic";
	}
	/**
	 * 打开上线车辆查询报表页面
	 * @return
	 */
	@RequestMapping("/viewOnlineVehicleList.action")
	public String viewOnlineVehicleList()
	{
		return "/report/onlineVehicleList";
	}

	/**
	 * 打开Acc熄火记录报表页面
	 * @return
	 */
	@RequestMapping("/viewAccRecord.action")
	public String viewAccRecord()
	{
		return "/report/accRecord";
	}

	/**
	 * 打开工作小时统计报表页面
	 * @return
	 */
	@RequestMapping("/viewVehicleWorkHour.action")
	public String viewVehicleWorkHour()
	{
		return "/report/vehicleWorkHourStatistic";
	}


	/**
	 * 打开报警次数统计报表页面
	 * @return
	 */
	@RequestMapping("/viewAlarmStatistic.action")
	public String viewAlarmStatistic()
	{
		return "/report/alarmStatistic";
	}

	@RequestMapping("/viewAlarmRecord.action")
	public String viewAlarmRecord()
	{
		return "/report/alarmRecord";
	}

	/**
	 * 打开Adas报警查询页面
	 * @return
	 */
	@RequestMapping("/viewAdasAlarmList.action")
	public String viewAdasAlarmList()
	{
		return "/report/adasAlarmList";
	}

	/**
	 * 打开Adas报警附件查询页面
	 * @return
	 */
	@RequestMapping("/viewAdasAlarmAttachmentList.action")
	public String viewAdasAlarmAttachmentList()
	{
		return "/report/adasAlarmAttachmentList";
	}


	/**
	 * 打开围栏报警报表页面
	 * @return
	 */
	@RequestMapping("/viewAreaInOutList.action")
	public String viewAreaInOutList()
	{
		return "/report/areaInOutList";
	}

	/**
	 * 打开部门上线率统计报表页面
	 * @return
	 */
	@RequestMapping("/viewDepartmentOnlineRate.action")
	public String viewDepartmentOnlineRate()
	{
		return "/report/departmentOnlineRate";
	}
	

	/**
	 * 打开围栏报警报表页面
	 * @return
	 */
	@RequestMapping("/viewDepOnlineRateChart.action")
	public String viewDepOnlineRateChart()
	{
		return "/report/depOnlineRateChart";
	}
	

	/**
	 * 打开上线下线记录页面
	 * @return
	 */
	@RequestMapping("/viewOnlineRecord.action")
	public String viewOnlineRecord()
	{
		return "/report/onlineRecord";
	}
	

	/**
	 * 打开停车记录页面
	 * @return
	 */
	@RequestMapping("/viewParkingList.action")
	public String viewParkingList()
	{
		return "/report/parkingList";
	}
	

	/**
	 * 打开报警处理记录页面
	 * @return
	 */
	@RequestMapping("/viewProcessedAlarmList.action")
	public String viewProcessedAlarmList()
	{
		return "/report/processedAlarmList2";
	}


	/**
	 * 打开终端命令日志记录页面
	 * @return
	 */
	@RequestMapping("/viewTerminalCommandList.action")
	public String viewTerminalCommandList()
	{
		return "/report/terminalCommandList";
	}

	/**
	 * 打开车辆上线率记录页面
	 * @return
	 */
	@RequestMapping("/viewVehicleOnlineRate.action")
	public String viewVehicleOnlineRate()
	{
		return "/report/vehicleOnlineRate";
	}
	

	/**
	 * 打开拍照预览页面
	 * @return
	 */
	@RequestMapping("/viewVehiclePictureOverview.action")
	public String viewVehiclePictureOverview()
	{
		return "/report/vehiclePictureOverview";
	}

	/**
	 * 打开拍照记录页面
	 * @return
	 */
	@RequestMapping("/viewVehiclePictureList.action")
	public String viewVehiclePictureList()
	{
		return "/report/vehiclePictureList";
	}
	


	/**
	 * 打开多媒体上传记录页面
	 * @return
	 */
	@RequestMapping("/viewMediaList.action")
	public String viewMediaList()
	{
		return "/report/mediaList";
	}
	

	/**
	 * 打开里程统计记录页面
	 * @return
	 */
	@RequestMapping("/viewMileageStatistic.action")
	public String viewMileageStatistic()
	{
		return "/report/mileageStatistic";
	}

	/**
	 * 打开历史轨迹查询记录页面
	 * @return
	 */
	@RequestMapping("/viewHistoryGpsInfo.action")
	public String viewHistoryGpsInfo()
	{
		return "/report/historyGpsInfo";
	}
	
	/**
	 * 打开驾驶员插卡记录页面
	 * @return
	 */
	@RequestMapping("/viewDriverCardList.action")
	public String viewDriverCardList()
	{
		return "/report/driverCardList";
	}

	/**
	 * 打开用户操作日志记录页面
	 * @return
	 */
	@RequestMapping("/viewOperationLog.action")
	public String viewOperationLog()
	{
		return "/report/operationLog";
	}
	

	/**
	 * 打开多媒体事件信息记录页面
	 * @return
	 */
	@RequestMapping("/viewMediaInfoList.action")
	public String viewMediaInfoList()
	{
		return "/report/mediaInfoList";
	}
	/**
	 * 打开多媒体事件信息记录页面
	 * @return
	 */
	@RequestMapping("/viewDispatchLog.action")
	public String viewDispatchLog()
	{
		return "/report/dispatchLog";
	}
	
	/**
	 * 打开车辆修改记录页面
	 * @return
	 */
	@RequestMapping("/viewVehicleModifyRecord.action")
	public String viewVehicleModifyRecord()
	{
		return "/report/vehicleModifyRecord";
	}
	
	/**
	 * 打开里程统计月度统计页面
	 * @return
	 */
	@RequestMapping("/viewMileageStatisticByMonth.action")
	public String viewMileageStatisticByMonth(Model m)
	{
		return "/report/mileageStatisticByMonth";
	}
}
